<%-- 
    Document   : ModifySponsoredEvent
    Created on : 30-giu-2011, 15.50.01
    Author     : Delo Team
--%>

<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.text.DateFormat"%>
<%@page import="java.util.Date"%>
<%@page import="ejb.SponsoredEvent"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <%@ include file="/style/styles.html" %>
        <%@ include file="/js/libraries.html" %>
        <title>Modifica Sponsorizzazione</title>
    </head>
    <body onload="init();">
        <div id="wrapper">
            <%@ include file="/header.jsp" %>

            <div id="body">
                <%
                    SponsoredEvent sevent = new SponsoredEvent();
                    String tags, sd, ed;
                    int maximpression;
                    Date start_date = null, end_date = null;

                    sevent = (SponsoredEvent) request.getAttribute("sevent");

                    maximpression = sevent.getMaxImpression();
                    tags = sevent.getTag();
                    start_date = sevent.getStartDate();
                    end_date = sevent.getEndDate();

                    DateFormat df = new SimpleDateFormat("dd/MM/yy");
                    df.setLenient(false);

                    sd = df.format(start_date);
                    ed = df.format(end_date);


                %>

                <img src="/delo-war/images/modifica.png" alt="Modifica evento" height="34" width="520" style="margin-top:50px;">

                <br /><br />
                <b>Nome Evento</b>: <%=sevent.getName()%>
                <br />
                <b>ID Evento</b>: <%=sevent.getEid()%>
                <br /><br />
                <form onSubmit="return checkForm();" name="eventList" action= "/delo-war/IMDSponsoredEvent.jsp">
                    <div id="form-sponsor-date">
                        <label>Da</label><input size="10" type="text" class="datepicker" id="data-from" name="data-from" value="<%=sd%>"/>
                        <label>A</label><input size="10" type="text" class="datepicker" id="data-to" name="data-to" value="<%=ed%>"/>
                    </div>
                    <br />
                    <div>
                        <lable>Max Impressions</lable><input id="max-imp" name="max-imp" value="<%=maximpression%>" type="text" size="10" />
                    </div>
                    <br />
                    <div><label>Tags</label><input type="text" id="tags-form" name="tags-form" value="<%=tags%>" style="width: 250px;"/></div>
                    <input type="hidden" name="action" value="modifyInsert">
                    <input type="hidden" name="eid" value="<%=sevent.getEid()%>">
                    <input type="hidden" name="name" value="<%=sevent.getName()%>">    
                    <br />

                    <input type="submit" name="Modifica" value ="Modifica"/>
                </form><br /><br /><br /><br /><br />
            </div>
            <div id="footer">
                unito.it - DIPARTIMENTO DI INFORMATICA (Facolt&agrave; di Scienze M.F.N.) - C.so Svizzera 185, Torino
            </div>
        </div>
    </body>
</html>
